#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Chance.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Chance)
{
        TEST(should be able to get the reverse of one chance:chance1(0.9)==!chance(0.1))
        {
                Chance chance(0.1);
		Chance chance1(0.9);
                ASSERT_TRUE(chance1 == !chance);   
        } 

        TEST(should be able to get the concurrence of two chance:changce3(0.06)==chance1(0.2)*chance2(0.3))
        {
                Chance chance1(0.2);
		Chance chance2(0.3);
		Chance changce3(0.06);
                ASSERT_TRUE(changce3 == chance1*chance2);   
        } 

        TEST(should be able to get the either of two chance:chance3(0.98)==chance1(0.8)+chance2(0.9))
        {
                Chance chance1(0.8);
		Chance chance2(0.9);
		Chance chance3(0.98);
                ASSERT_TRUE(chance3 == chance1+chance2);   
        } 
};
